<template>
  <view class="contact-container">
    <!-- 顶部背景区 -->
    <view class="header-section">
      <view class="header-gradient"></view>
      <view class="company-info">
        <view class="company-name-wrapper">
          <text class="company-icon">🍷</text>
          <text class="company-name">美！玖！桩</text>
        </view>
        <text class="company-slogan">品质美酒 · 诚信经营</text>
        <view class="location-wrapper">
          <text class="location-icon">📍</text>
          <text class="company-address">北京市朝阳区建国路88号</text>
        </view>
      </view>
    </view>
    
    <!-- 二维码卡片 -->
    <view class="qrcode-card">
      <view class="card-header">
        <text class="card-title">微信扫一扫</text>
        <text class="card-subtitle">添加好友了解更多</text>
      </view>
      <view class="qrcode-wrapper">
        <view class="qrcode-container">
          <image class="qrcode-image" src="/static/logo.png" mode="aspectFit"></image>
        </view>
        <text class="qrcode-tip">长按识别二维码</text>
      </view>
    </view>
    
    <!-- 联系方式卡片 -->
    <view class="contact-card">
      <view class="contact-item" @click="makePhoneCall">
        <view class="contact-icon-wrapper phone">
          <text class="contact-icon">📞</text>
        </view>
        <view class="contact-content">
          <text class="contact-label">电话咨询</text>
          <text class="contact-value">12323343453</text>
        </view>
        <text class="arrow">›</text>
      </view>
    </view>
    
    <!-- 底部装饰 -->
    <view class="footer">
      <text class="footer-text">感谢您的信任与支持</text>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      phoneNumber: '12323343453'
    }
  },
  methods: {
    makePhoneCall() {
      uni.makePhoneCall({
        phoneNumber: this.phoneNumber,
        success: () => {
          console.log('拨打电话成功');
        },
        fail: (err) => {
          console.error('拨打电话失败', err);
        }
      });
    }
  }
}
</script>

<style>
.contact-container {
  height: 100vh;
  background: linear-gradient(180deg, #fef8f0 0%, #ffffff 100%);
  display: flex;
  flex-direction: column;
  padding-bottom: 20px;
  box-sizing: border-box;
}

/* 顶部区域 */
.header-section {
  position: relative;
  height: 140px;
  overflow: hidden;
  flex-shrink: 0;
}

.header-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #ff8c00 0%, #ff6600 100%);
  opacity: 0.95;
}

.company-info {
  position: relative;
  z-index: 2;
  padding: 30px 24px 20px;
  color: #fff;
}

.company-name-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.company-icon {
  font-size: 24px;
  margin-right: 8px;
}

.company-name {
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 2px;
}

.company-slogan {
  font-size: 12px;
  display: block;
  margin-bottom: 10px;
  opacity: 0.9;
  letter-spacing: 1px;
}

.location-wrapper {
  display: flex;
  align-items: center;
}

.location-icon {
  font-size: 12px;
  margin-right: 4px;
}

.company-address {
  font-size: 11px;
  opacity: 0.85;
}

/* 二维码卡片 */
.qrcode-card {
  margin: 16px 16px 12px;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.card-header {
  text-align: center;
  margin-bottom: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  display: block;
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 12px;
  color: #999;
  display: block;
}

.qrcode-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qrcode-container {
  width: 140px;
  height: 140px;
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid #f0f0f0;
  margin-bottom: 10px;
}

.qrcode-image {
  width: 100%;
  height: 100%;
}

.qrcode-tip {
  font-size: 12px;
  color: #666;
}

/* 联系方式卡片 */
.contact-card {
  margin: 0 16px;
  background: #fff;
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border-radius: 12px;
  transition: background-color 0.3s;
}

.contact-item:active {
  background-color: #f9f9f9;
}

.contact-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
}

.contact-icon-wrapper.phone {
  background: linear-gradient(135deg, #ff8c00 0%, #ff6600 100%);
}

.contact-icon {
  font-size: 24px;
}

.contact-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.contact-label {
  font-size: 13px;
  color: #999;
  margin-bottom: 4px;
}

.contact-value {
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

.arrow {
  font-size: 20px;
  color: #ccc;
  margin-left: 8px;
}

/* 底部 */
.footer {
  text-align: center;
  padding: 16px 0 10px;
  flex-shrink: 0;
}

.footer-text {
  font-size: 12px;
  color: #999;
}
</style>